package yifeng.thread;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

public class T326_1 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<Integer> list = new CopyOnWriteArrayList();
		List<Integer> list2 = new ArrayList();
		
		for(int i = 0; i < 10; i++)
			list.add(i);
		
		for(Integer ii : list){
			System.out.println(ii);
			if(ii == 8)
				list.add(12);
		}
		
		System.out.println();
		
		for(Integer ii : list){
			System.out.println(ii);
		}
	}

}
